// 12.19.12
// XBee Lib Tester

#include <stdio.h>
#include <string.h>
#include "XBee.h"
#include "XBeeDefine.h"

int main(void)
{
	void *ptr;
	int data = 5;
	ptr = &data;
	
	bufferData(ptr, INT_TYPE);
	transmit();
	
	if(pullBuffer())
	{
		printf("Returned: %d\n", rxReturnInt());
	}
	
	
	char strData[] = "print me!";
	ptr = &strData;
	
	bufferData(ptr, STRING_TYPE);
	transmit();
	
	if(pullBuffer())
	{
		char str[32];
		rxReturnString(&str[0]);
		printf("Returned %s", str);
	}
	
	double dblData = 1.3354;
	ptr = &dblData;
	
	bufferData(ptr, DOUBLE_TYPE);
	transmit();
	
	if(pullBuffer())
	{
		printf("Returned: %f\n", rxReturnDouble());
	}
	
}
